<?
	session_start();
	mysql_connect("localhost","root","root");
	mysql_select_db("database");
	$strSQL = "SELECT * FROM member WHERE u_name = '$txtUsername' and pass = '$txtPassword'";
	$objQuery = mysql_query($strSQL);
	$objResult = mysql_fetch_array($objQuery);
	if(!$objResult)
	{
			
			echo "Username and Password Incorrect!";
			echo "<br> Go to <a href='login.php'>Back</a>";
			
	}
	else
	{
			setcookie("USER",$txtUsername,time()+3600*24);
				header("location:index.php");
			
	}
	mysql_close();
?>